interface Ishape{//接口不能被实例化
    //接口成员变量默认public static以及final
    //接口不能有具体实现方法,但可以用default修饰 、static方法
    //接口默认有public abstract
    public void draw();
}
interface DD extends Ishape{
    public void run();
}
class A implements DD{
    public void run(){
        System.out.println("正在运行");
    }
    public void draw(){
        System.out.println("画矩形");
    }
}
class B implements Ishape{
    public void draw(){
        System.out.println("画原型");
    }
}

public class Text01 {
    public static void shapedraw(Ishape ishape){
        ishape.draw();
    }
    public static  void running(DD robot){
        robot.run();
    }

    public static void main(String[] args) {
        /*Ishape rect=new A();
        Ishape cycle=new B();
        rect.draw();
        cycle.draw();*/
        A rect=new A();
        shapedraw(rect);
        DD robot=new A();
        running(robot);
    }
}
